package letsjava.pattern.adapter;

public class PegAdapter extends SquarePeg {
	private RoundPeg roundPeg;

	public PegAdapter(RoundPeg peg) {
		this.roundPeg = peg;
	}

	public void insert(String str) {
		roundPeg.insertIntohole(str);
	}
	
	public static void main(String[] args){
		PegAdapter a = new PegAdapter(new RoundPeg());
		a.insert("hello");
		SquarePeg b = new SquarePeg();
		b.insert("hello2");
	}
}